
#import <Foundation/Foundation.h>
#import <SystemConfiguration/SystemConfiguration.h>


typedef enum {
	NotReachable = 0,	
	ReachableViaWiFi,	
	ReachableViaWWAN	
} NetworkStatus;

#define kReachabilityChangedNotification @"kNetworkReachabilityChangedNotification"

@interface Reachability: NSObject
{
	BOOL localWiFiRef;
	SCNetworkReachabilityRef reachabilityRef;
}


+ (Reachability*) reachabilityWithHostName: (NSString*) hostName;


+ (Reachability*) reachabilityForInternetConnection;


+ (Reachability*) reachabilityForLocalWiFi;


+ (Reachability*) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress;

- (BOOL) startNotifer;
- (void) stopNotifer;

- (NetworkStatus) currentReachabilityStatus;

- (BOOL) connectionRequired;

@end


